package client.comm.snackbar;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.fragment.app.FragmentManager;

import com.google.android.material.snackbar.Snackbar;

public class SnackBarUtil {
//    static long currTime = 0;

    public static void snackBar(Activity context, String msg) {
//        long bb = System.currentTimeMillis();
//        if ((bb - currTime) < 2000) {
//            return;
//        }
//        currTime = bb;

        ActivityOptionsCompat option = ActivityOptionsCompat.makeCustomAnimation(context, R.anim.pop_in, R.anim.pop_out);
        Intent intent = new Intent(context, SnackBarActivity.class);
        intent.putExtra("msg", msg);
        ActivityCompat.startActivity(context, intent, option.toBundle());
    }


}
